//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.tongweb.commons.license.bean;

import java.io.Serializable;
import java.util.Objects;

public class TongTechLicenseNew implements Serializable {
    private static final long serialVersionUID = -1235205851591221012L;
    private static final String LICENSE_NAME = "license.dat";
    private String customerName = null;
    private String projectName = null;
    private String projectId = null;
    private String bargainId = null;
    private String licenseType = null;
    private String createDate = null;
    private String endDate = null;
    private String tongWebName = null;
    private String tongWebVersion = "0.0";
    private String maxNumber;
    private boolean isPublishingVersion = false;
    private boolean isProvisionalVersion = false;
    private boolean isTrialVersion = false;
    private boolean isInternalUsedEdition = false;
    private boolean isUnlimited = false;
    private String tongWebEdition = null;
    private boolean isEnterpriseEdition = false;
    private String ipAddress = null;
    private String MAC_ADDRESS = null;
    private String hardwareId = null;
    private String cpuCount = null;
    private String externPropertiesName = null;
    private String externPropertiesValue = null;
    private final Integer testAllowedThreads = 5;
    private String licenseServer;
    private String licenseServerVersion;

    public TongTechLicenseNew() {
    }

    public final String getTongWebName() {
        return this.tongWebName;
    }

    public final String getTongWebEdition() {
        return this.tongWebEdition;
    }

    public final void setTongWebEdition(String tongWebEdition) {
        System.err.println("real tongWebEdition is: " + tongWebEdition);
        this.tongWebEdition = "Embed";
    }

    public void setCustomerName(String CONSUMER_NAME) {
        System.err.println("real customerName is: " + CONSUMER_NAME);
        this.customerName = "广州某国企";
    }

    public void setProjectName(String PROJECT_NAME) {
        System.err.println("real projectName is: " + PROJECT_NAME);
        this.projectName = "信创迁移项目";
    }

    public void setProjectId(String PROJECT_ID) {
        System.err.println("real projectId is: " + PROJECT_ID);
        this.projectId = "PROJECT_ID888";
    }

    public void setBargainId(String bargainId) {
        System.err.println("real bargainId is: " + bargainId);
        this.bargainId = "bargainId888";
    }

    public void setLicenseType(String licenseType) {
        System.err.println("real licenseType is: " + licenseType);
        // trial: 试用
        this.licenseType = "trial";
    }

    public String getLicenseType() {
        return this.licenseType;
    }

    public void setCreateDate(String createDate) {
        System.err.println("real createDate is: " + createDate);
        this.createDate = "2000-01-01";
    }

    public void setEndDate(String endDate) {
        System.err.println("real endDate is: " + endDate);
//        this.endDate = "2099-12-31";
        this.endDate = "-1";
    }

    public void setTongWebName(String tongWebName) {
        System.err.println("real tongWebName is: " + tongWebName);
        this.tongWebName = "TongWeb";
    }

    public void setTongWebVersion(String tongWebVersion) {
        System.err.println("real tongWebVersion is: " + tongWebVersion);
        this.tongWebVersion = "7.0.E";
    }

    public void setMaxNumber(String maxNumber) {
        System.err.println("real maxNumber is: " + maxNumber);
        this.maxNumber = "-1";
    }

    public void setPublishingVersion(boolean publishingVersion) {
        System.err.println("real publishingVersion is: " + publishingVersion);
        this.isPublishingVersion = true;
    }

    public void setProvisionalVersion(boolean provisionalVersion) {
        System.err.println("real provisionalVersion is: " + provisionalVersion);
        this.isProvisionalVersion = false;
    }

    public void setTrialVersion(boolean trialVersion) {
        System.err.println("real trialVersion is: " + trialVersion);
        this.isTrialVersion = false;
    }

    public void setInternalUsedEdition(boolean internalUsedEdition) {
        System.err.println("real internalUsedEdition is: " + internalUsedEdition);
        this.isInternalUsedEdition = false;
    }

    public boolean getPublishingVersion() {
        return this.isPublishingVersion;
    }

    public boolean getProvisionalVersion() {
        return this.isProvisionalVersion;
    }

    public boolean getTrialVersion() {
        return this.isTrialVersion;
    }

    public boolean getInternalUsedEdition() {
        return this.isInternalUsedEdition;
    }

    public void setUnlimited(boolean unlimited) {
        System.err.println("real unlimited is: " + unlimited);
        this.isUnlimited = true;
    }

    public boolean getUnlimited() {
        return this.isUnlimited;
    }

    public void setEnterpriseEdition(boolean enterpriseEdition) {
        System.err.println("real enterpriseEdition is: " + enterpriseEdition);
        this.isEnterpriseEdition = true;
    }

    public boolean getEnterpriseEdition() {
        return this.isEnterpriseEdition;
    }

    public void setIpAddress(String ipAddress) {
        System.err.println("real ipAddress is: " + ipAddress);
        this.ipAddress = "";
    }

    public void setHardwareId(String hardwareId) {
        System.err.println("real hardwareId is: " + hardwareId);
        this.hardwareId = "";
    }

    public void setCpuCount(String cpuCount) {
        System.err.println("real cpuCount is: " + cpuCount);
        this.cpuCount = "";
    }

    public void setExternPropertiesName(String externPropertiesName) {
        System.err.println("real externPropertiesName is: " + externPropertiesName);
//        this.externPropertiesName = "license_id,THS_Version_Number,THS_Product_Name,";
        this.externPropertiesName = "";
    }

    public void setExternPropertiesValue(String externPropertiesValue) {
        System.err.println("real externPropertiesValue is: " + externPropertiesValue);
        this.externPropertiesValue = "";
    }

    public String getMacAddress() {
        return this.MAC_ADDRESS;
    }

    public void setMacAddress(String MAC_ADDRESS) {
        System.err.println("real MAC_ADDRESS is: " + MAC_ADDRESS);
        this.MAC_ADDRESS = "";
    }

    @Override
    public String toString() {
        return "TongTechLicense{customerName='" + this.customerName + '\'' + ", projectName='" + this.projectName + '\'' + ", projectId='" + this.projectId + '\'' + ", bargainId='" + this.bargainId + '\'' + ", licenseType='" + this.licenseType + '\'' + ", createDate='" + this.createDate + '\'' + ", endDate='" + this.endDate + '\'' + ", tongWebName='" + this.tongWebName + '\'' + ", tongWebVersion='" + this.tongWebVersion + '\'' + ", maxNumber='" + this.maxNumber + '\'' + ", isPublishingVersion=" + this.isPublishingVersion + ", isProvisionalVersion=" + this.isProvisionalVersion + ", isTrialVersion=" + this.isTrialVersion + ", isInternalUsedEdition=" + this.isInternalUsedEdition + ", isUnlimited=" + this.isUnlimited + ", tongWebEdition='" + this.tongWebEdition + '\'' + ", isEnterpriseEdition=" + this.isEnterpriseEdition + ", ipAddress='" + this.ipAddress + '\'' + ", MAC_ADDRESS='" + this.MAC_ADDRESS + '\'' + ", hardwareId='" + this.hardwareId + '\'' + ", cpuCount='" + this.cpuCount + '\'' + ", externPropertiesName='" + this.externPropertiesName + '\'' + ", externPropertiesValue='" + this.externPropertiesValue + '\'' + ", testAllowedThreads=" + this.testAllowedThreads + ", licenseServer='" + this.licenseServer + '\'' + ", licenseServerVersion='" + this.licenseServerVersion + '\'' + '}';
    }

    public boolean isUnlimited() {
        if (this.endDate.equals("-1")) {
            this.isUnlimited = true;
        }

        return this.isUnlimited;
    }

    public boolean isLimitMaxNumber() {
        return this.getMaxNumber() != null && this.getMaxNumber().length() != 0 && !"-1".equals(this.getMaxNumber());
    }

    public final String getTongWebVersion() {
        return this.tongWebVersion;
    }

    public final String getCustomerName() {
        return this.customerName;
    }

    public final String getProjectName() {
        return this.projectName;
    }

    public final String getCreateDate() {
        return this.createDate;
    }

    public final String getEndDate() {
        return this.endDate;
    }

    public final String getIpAddress() {
        return this.ipAddress;
    }

    public final Integer getTestAllowedThreads() {
        return this.testAllowedThreads;
    }

    public String getMaxNumber() {
        return this.maxNumber;
    }

    public String getProjectId() {
        return this.projectId;
    }

    public String getBargainId() {
        return this.bargainId;
    }

    public String getHardwareId() {
        return this.hardwareId;
    }

    public String getCpuCount() {
        return this.cpuCount;
    }

    public String getExternPropertiesName() {
        return this.externPropertiesName;
    }

    public String getExternPropertiesValue() {
        return this.externPropertiesValue;
    }

    public String getLicenseServer() {
        return this.licenseServer;
    }

    public void setLicenseServer(String licenseServer) {
        System.err.println("real licenseServer is: " + licenseServer);
        this.licenseServer = "";
    }

    public String getLicenseServerVersion() {
        return this.licenseServerVersion;
    }

    public void setLicenseServerVersion(String licenseServerVersion) {
        System.err.println("real licenseServerVersion is: " + licenseServerVersion);
        this.licenseServerVersion = "";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        } else if (o != null && this.getClass() == o.getClass()) {
            TongTechLicenseNew that = (TongTechLicenseNew)o;
            return this.isPublishingVersion == that.isPublishingVersion && this.isProvisionalVersion == that.isProvisionalVersion && this.isTrialVersion == that.isTrialVersion && this.isInternalUsedEdition == that.isInternalUsedEdition && this.isUnlimited == that.isUnlimited && this.isEnterpriseEdition == that.isEnterpriseEdition && Objects.equals(this.customerName, that.customerName) && Objects.equals(this.projectName, that.projectName) && Objects.equals(this.projectId, that.projectId) && Objects.equals(this.bargainId, that.bargainId) && Objects.equals(this.licenseType, that.licenseType) && Objects.equals(this.createDate, that.createDate) && Objects.equals(this.endDate, that.endDate) && Objects.equals(this.tongWebName, that.tongWebName) && Objects.equals(this.tongWebVersion, that.tongWebVersion) && Objects.equals(this.maxNumber, that.maxNumber) && Objects.equals(this.tongWebEdition, that.tongWebEdition) && Objects.equals(this.ipAddress, that.ipAddress) && Objects.equals(this.hardwareId, that.hardwareId) && Objects.equals(this.cpuCount, that.cpuCount) && Objects.equals(this.externPropertiesName, that.externPropertiesName) && Objects.equals(this.externPropertiesValue, that.externPropertiesValue) && Objects.equals(this.testAllowedThreads, that.testAllowedThreads) && Objects.equals(this.licenseServer, that.licenseServer) && Objects.equals(this.licenseServerVersion, that.licenseServerVersion);
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return Math.abs(Objects.hash(new Object[]{this.customerName, this.projectName, this.projectId, this.bargainId, this.licenseType, this.createDate, this.endDate, this.tongWebName, this.tongWebVersion, this.maxNumber, this.isPublishingVersion, this.isProvisionalVersion, this.isTrialVersion, this.isInternalUsedEdition, this.isUnlimited, this.tongWebEdition, this.isEnterpriseEdition, this.ipAddress, this.hardwareId, this.cpuCount, this.externPropertiesName, this.externPropertiesValue, this.testAllowedThreads, this.licenseServer, this.licenseServerVersion}));
    }

    public String getMAC_ADDRESS() {
        return this.MAC_ADDRESS;
    }

    public void setMAC_ADDRESS(String MAC_ADDRESS) {
        System.err.println("real MAC_ADDRESS is: " + MAC_ADDRESS);
        this.MAC_ADDRESS = "";
    }
}
